package gcj2011.qual;

import common.AbstractRunner;

public class C extends AbstractRunner {

	@Override
	public void handleCase(int caseNumber) throws Exception {		
		int n = scanner.nextInt();		
		int xor = 0;
		int sum = 0;
		int min = Integer.MAX_VALUE;
		for (int i=0; i<n; i++) {
			int cur = scanner.nextInt();
			xor ^= cur;
			sum += cur;
			if (cur < min) {
				min = cur;
			}
		}
		
		if (xor != 0) {
			out.write("NO\n");
		} else {
			out.write((sum - min)+"\n");
		}
	}
	
	public static void main(String[] args) throws Exception {
		new C().init(SIZE.large).execute();
	}

}
